package com.lgs7907.simplestockinfo;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebView;

public class HtmlReadActivity extends Activity {
	private String fileTitle;
	private String fileUrl;
	private WebView webView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);//竖屏

		setContentView(R.layout.activity_html_read);
		// 实例化WebView
		webView = (WebView) this.findViewById(R.id.wv_html_read);

		fileTitle = getIntent().getStringExtra("DATATITLE");
		setTitle(fileTitle);

		fileUrl = getIntent().getStringExtra("DATAURL");
		/* 调用loadUrl()方法进行加载内容 */
		webView.loadUrl(fileUrl);
		/** * 设置WebView的属性，此时可以去执行JavaScript脚本 */
		webView.getSettings().setJavaScriptEnabled(true);
	}
}
